<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>鼠标悬停事件</title>
	<script src="js/jquery-3.3.1.min.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<p id="p1" class="p1">鼠标放在上面，我会变成蓝色</p>
	</body>
</html>
<script type="text/javascript">
	$(document).ready(()=>{
		$("p").hover(()=>{
			$("#p1").css("background","blue")
		},()=>{
			$(".p1").css("background","red")
		})
	})
</script>